<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xi="http://www.w3.org/2001/XInclude"
      xmlns:py="http://genshi.edgewall.org/">
    <xi:include href="master.html" />

<?python from mnemoply.utils import format_currency, date2str_points ?>

<head />

<body>
    <h1>Payment confirmation</h1>

    <table>
        <thead>
        <tr>
            <td>Student</td>
            <td>Group</td>
            <td>Amount</td>
            <td>Cash register</td>
            <td>Date</td>
            <td>Comment</td>
        </tr>
        </thead>

        <tbody>
            <tr py:for="sig, amount, register, date, comment in what">
                <td>${sig.student.title}</td>
                <td>${sig.group.title}</td>
                <td>${format_currency(amount)}</td>
                <td>${register.title}</td>
                <td>${date2str_points(date)}</td>
                <td>${comment}</td>
            </tr>
        </tbody>
    </table>

    <form action="${action}" method="POST">
        <input type="hidden" name="came_from" value="${came_from}" />

        <span py:for="sig, amount, register, date, comment in what">
            <input type="hidden" name="amount_${sig.id}" value="${amount}" />
            <input type="hidden" name="comment_${sig.id}" value="${comment}" />
            <input type="hidden" name="register" value="${register.id}" />
            <input type="hidden" name="start_date" value="${date2str_points(date)}" />
        </span>

        <input type="submit" value="${_('Enter payment')}" />
    </form>
    <span>${ET(tg.back_widget())}</span>
</body>
</html>
